<template>
  <div class="container">
    <div class="flex flex-wrap f-ptp10">
      <el-input class='f-mrt20 f-mbt10 f-w120' v-model="phone" placeholder="律师ID"></el-input>
      <el-input class='f-mrt20 f-mbt10 f-w120' v-model="phone" placeholder="手机号"></el-input>
      <el-input class='f-mrt20 f-mbt10 f-w120' v-model="phone" placeholder="姓名"></el-input>
      <el-input class='f-mrt20 f-mbt10 f-w120' v-model="createTime" placeholder="申请时间开始-结束"></el-input>
      <el-button class='f-h40' @click="search" type="primary">查询</el-button>
    </div>

    <div>
      <el-table
        :data="tableData"
        border
        style="width: 100%">
        <el-table-column prop="issueType" label="律师ID" width="180"></el-table-column>
        <el-table-column prop="phone" label="手机号" width="180"></el-table-column>
        <el-table-column prop="region" label="姓名" width="180"></el-table-column>
        <el-table-column prop="createTime" label="申请时间" width="180"></el-table-column>
        <el-table-column prop="manage" label="管理">
          <template slot-scope="scope">
            <el-button
              size="mini"
              @click="auditBtnClickEvent(scope.$index, scope.row)">编 辑</el-button>
            <el-button
              size="mini"
              @click="auditBtnClickEvent(scope.$index, scope.row)">查看详情</el-button>
            <el-button
              size="mini"
              @click="auditBtnClickEvent(scope.$index, scope.row)">禁 用</el-button>
          </template>
        </el-table-column>
      </el-table>
      <div>
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page.sync="currentPage1"
          :page-size="100"
          layout="total, prev, pager, next"
          :total="1000">
        </el-pagination>
      </div>
    </div>

    <el-dialog
      title="律师审核"
      :visible.sync="dialogVisible"
      width="560px"
      :before-close="handleClose">
      <div class='d-item'>
        <label for="">律师姓名</label>
        <p>张三</p>
      </div>
      <div class='d-item'>
        <label for="">身份证号</label>
        <p>张三</p>
      </div>
      <div class='d-item'>
        <label for="">性别</label>
        <p>张三</p>
      </div>
      <div class='d-item'>
        <label for="">常用邮箱</label>
        <p>张三</p>
      </div>
      <div class='d-item'>
        <label for="">微信</label>
        <p>张三</p>
      </div>
      <div class='d-item'>
        <label for="">执业证号</label>
        <p>张三</p>
      </div>
      <div class='d-item'>
        <label for="">所在地区</label>
        <p>张三</p>
      </div>
      <div class='d-item'>
        <label for="">擅长专长</label>
        <p>张三</p>
      </div>
      <div class='d-item'>
        <label for="">执业律所</label>
        <p>张三</p>
      </div>
      <div class='d-item'>
        <label for="">详细地址</label>
        <p>张三</p>
      </div>
      <div class='d-item'>
        <label for="">图片信息</label>
        <p>张三</p>
      </div>
      <div class="d-footer">
        <el-button type="primary" @click="dialogVisible = false">通 过</el-button>
        <el-button type="primary" @click="dialogVisible = false">拒 绝</el-button>
        <el-button @click="dialogVisible = false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: 'LawyerManage',
  data() {
    return {
      dialogVisible: false,
      phone: '',
      password: '',
      tableData: [
        {
          userCode: '2016-05-02',
          phone: '18098758888',
          name: '王小虎',
          idCard: '330326199908080606',
          accountBalance: 5000.00,
          vip: 1,
          createTime: '2018-12-30'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        }, {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄'
        }
      ]
    }
  },
  methods: {
    auditBtnClickEvent(index, item) {
      console.log('index:::', index);
      console.log('item:::', item);
      this.dialogVisible = true;
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

.d-item{
  overflow: hidden;
}
.d-item>label{
  width: 80px;
  line-height: 32px;
  text-align: right;
  float: left;
}
.d-item>p{
  line-height: 32px;
  float: left;
  padding-left: 20px;
}
.d-footer{
  text-align: center;
  padding-top: 20px;
}
</style>
